using System;
using System.Drawing.Printing;

namespace SpoolFileLibrary.Reader.Winspool {
    public class PrintQuality {
        private readonly PrinterResolutionKind printerResolutionKind;
        private readonly short printerResolutionValue;

        public PrintQuality(short value) {
            this.printerResolutionValue = value;
            if(!Enum.IsDefined(typeof(PrinterResolutionKind), (int) value)) {
                this.printerResolutionKind = PrinterResolutionKind.Custom;
                return;
            }
            this.printerResolutionKind = (PrinterResolutionKind) value;
            return;
        }

        public PrinterResolutionKind PrinterResolutionKind {
            get { return this.printerResolutionKind; }
        }

        public short PrinterResolutionValue {
            get { return this.printerResolutionValue; }
        }
    }
}